package com.tokenplus.thai.create.adapter

import com.tokenplus.thai.adata.RevDataMnemonic

data class DataMnemonicVerify(
    var index: Int,
    val list: List<RevDataMnemonic>
) {
    /** 成功选中 */
    fun hadCheckedSuccess(): Boolean {
        var hasSuccess = false
        list.forEach { subItem ->
            if (subItem.selected) {
                hasSuccess = (subItem.index == index)
            }
        }

        return hasSuccess
    }

    /** 成功选中 */
    fun checkedSuccessContent(): String {
        var content = ""
        list.forEach { subItem ->
            if (subItem.selected) {
                if (subItem.index == index) {
                    content = subItem.content
                }
            }
        }

        return content
    }
}
